<script setup lang="ts">
import {ref, reactive, computed} from "vue";

const count = ref<number>(0)
const testObj = ref<object>({
  name: '蒋皓天',
  sex: '男'
})
const testObj2 = reactive<object>({
  name: '琉璃纸',
  sex: '女'
})

function getInformation() {
  // testObj.value.name = 'jht'
  testObj.value.job = '前端开发工程师'
  console.log('testObj.value:', testObj.value)
}

function getTestObj() {
  console.log('testOjb', testObj2)
}

</script>

<template>
  <div>
    <button @click="count++">
      {{count}}
    </button>
    <div>
      {{testObj}}
    </div>
    <div>
      {{testObj2}}
    </div>
    <button @click="getInformation()">
      触发Ref
    </button>
    <button @click="getTestObj()">
      触发Reactive
    </button>
  </div>
</template>

<style scoped>
</style>
